Options and global configuration

There are local and global options. Local options are specified as arguments via the command line or as ToolTypes if WHDLoad is started from the Workbench.
The global configuration file is "S:whdload.prefs". It is a usual ASCII file and contains one option per line. Empty lines and comments are ignored. A comment is line based, starts with the character ";" and goes up to the end of line.
An example config-file is contained in the developer package ("S/whdload.prefs").

Overview

List of available options

Name of optionTypeLocalGlobalDefault value
ButtonWaitswitcherxx
Cacheswitcherx-
CoreDumpswitcherx-
CoreDumpPathstring-xPROGDIR:
Custom1switcherx-
Custom2switcherx-
Custom3switcherx-
Custom4switcherx-
Custom5switcherx-
DebugKeynumericalxx-
DCacheswitcherx-
ExecuteCleanupstring-x-
ExecuteStartupstring-x-
Expertswitcher-x
FileLogswitcherx-
FreezeKeynumericalxx$5d
MMUswitcherxx
NoAutoVecswitcherxx
NoCacheswitcherx-
NoDCacheswitcherx-
NoMMUswitcherxx
NoTrapHandlerswitcherx-
NoVBRMoveswitcherx-
NTSCswitcherx-
PALswitcherx-
Preloadswitcherx-
QuitKeynumericalxx-
Slavestringx-WHDLoad.Slave
SnoopAGAswitcherx-
SnoopECSswitcherx-
SnoopOCSswitcherx-
WriteDelaynumericalxx150

Types of options

numerical: the value of the option is an integer,
on the command line you must use decimal notation, as ToolType you can also use hexadecimal notation indicated by a leading "$"
string: the value of the option is a string
switcher: option will be enabled if specified (boolean)

Example

Workbench:
Command line:
(CLI/Shell)
1> WHDLoad SuperGame.Slave PreLoad NTSC QuitKey=69 Custom1=1

Description of each Option

ButtonWait/S

This option does not affect WHDLoad itself, but can be asked by the Slave.
The meaning of this options is, that if set the users wants that the installed program should wait for pressing a button when it shows pictures and/or plays music and normally it does this only for a very limited time.

Cache/S

This option enables the instruction cache for the installed program.
The option has no effect if NoCache/S is also set.

CoreDump/S

If selected on every exit from an installed program WHDLoad creates a memory and register dump, this may be useful to rip a music-module from the memory dump or for debugging.

CoreDumpPath

The destination directory for all dump files created by WHDLoad.

Custom1/K/N, Custom2/K/N, Custom3/K/N, Custom4/K/N, Custom5/K/N

These options are not used by WHDLoad itself, but can be asked by the Slave to control various Slave specific things.

DCache/S

This option enables the instruction and the data cache for the installed program (it implies Cache/S), the data cache will not be enabled if the option NoDCache/S is also active, the instruction cache will not be enabled if NoCache/S is set.

Expert/S

This option enables the expert mode of WHDLoad. Currently it affects only the DebugKey/S feature. If expert mode is not active DebugKey/S is not available.

ExecuteCleanup

With this option a command can be specified which will executed by WHDLoad on exit.

ExecuteStartup

With this option a command can be specified which will executed by WHDLoad on startup.

DebugKey/K/N

Sets the rawkey code to quit the program with debug (write coredump files and quit), this works only if the expert mode is active, if the VBR is moved by WHDLoad (NoVBRMove/S is not set and the cpu is at least a 68010) or the Slave itself does support it.

FileLog/S

This option is only for debugging purposes, Click here for more info.
This option disables the option PreLoad/S.

FreezeKey/K/N

If you are using one of the supported software freezers (HrtMon 2.1 or Thrillkill 1.04) you can use this option to setup a rawkey code on which pressed WHDLoad will enter the freezer, that this works the VBR must be moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) and the freezer must be active, the default key is $5d (gray '*' on the numerical keyblock).

MMU/S

This must be used on 68030 machines to get the mmu related features working (memory protection, improved cache managment, Snooping, resload_Protect#? functions), on 68040/060 this option has no effect because the MMU will be used on default, it is recommend to set this option in the global configuration file for all systems with an 68030 with working MMU (i.e. not a 68ec030) because it increases stability and security a lot, if the option NoMMU/S is also set this option has no effect.

NoAutoVec/S

If selected WHDLoad will not quit if an unexpected autovector or NMI occures (vectors #25-31 / $64-$7c), this should be used on machines/hardware which will create at random such interrupts to prevent WHDLoad from exiting.

NoCache/S

If selected the caches for the installed program are disabled, also the Slave cannot enable them (via resload_SetCACR), this option overrides Cache/S and DCache/S.

NoDCache/S

Disables the data cache for the installed program, also the Slave cannot enable it (via resload_SetCACR), this option overrides DCache/S.

NoMMU/S

If this option is set WHDLoad will not use the MMU, this is a Critical and Dangerous option only recommend for testing or debugging not for normal use. Click here for more info. The option overides MMU/S.

NoTrapHandler/S

If this option is enabled WHDLoad will use the original vector table from the OS which is active on starting WHDLoad, for the installed program, instead of creating his own vector table with which WHDLoad will catch all exceptions itself. This will only useful for debugging purposes and should not be used for normal operation. Warning: if an exception handler which will called trough the original vector table tries to call any OS function or tries to use OS data structures the machine will crash (e.g. exec.Alert).

NoVBRMove/S

On default WHDLoad does move the VBR to a memory location different to $0, this has the advantage that the installed program cannot change the vector table, which increases security and stability of WHDLoad a lot. Some installed programs / Slaves will not correctly work with a moved VBR, the reason for this maybe that the installed program does some strange stuff which is not supported by a moved VBR (like using the VERTB to check the keyboard) or the author of the install was to lame to support a moved VBR. In such a case this option must be set to prevent WHDLoad from moving the VBR.
Another feature of the moved VBR is, that WHDLoad can check the keyboard each time an Autovector interrupt occurs. With this check WHDLoad is able to terminate the installed program absolutely independent from the work of installed program / Slave if QuitKey/S or DebugKey/S will be pressed (similar the installed program can be interrupted when FreezeKey/S is pressed). The VBR moving feature requires at least a 68010 to work. On a 68000 this option has no effect, because the VBR is here always at $0 and cannot be moved.

NTSC/S

If selected WHDLoad will use a NTSC display (60Hz) for the installed program, on a PAL Amigas it is nesseccary for this, that the NTSC monitor driver is properly installed in DEVS:Monitors/ .

PAL/S

If selected WHDLoad will use a PAL display (50Hz) for the installed program, on a NTSC Amigas it is nesseccary for this, that the PAL monitor driver is properly installed in DEVS:Monitors/ .

Preload/S

If this option is enabled WHDLoad will load files and disk images as far as possible to memory (depending on how much memory is free) on startup, to increase performance when the installed program is running, because it avoids switches to the OS to load data directly from the harddisk. This option should always be enabled.

QuitKey/K/N

Sets the rawkey code to quit the program, this works only if the VBR is moved by WHDLoad (NoVBRMove/S must not be set and the cpu must be at least a 68010) or the Slave itself does support it.

Slave

Name of the Slave which should be used by WHDLoad. The Slave contains the interface code which is required for communication between the installed program and WHDLoad.

SnoopAGA/S, SnoopECS/S, SnoopOCS/S

These options enables the Custom register Snoop feature of WHDLoad. Click here for more info.

WriteDelay/K/N

This option specifies the time in 1/50 seconds that WHDLoad will wait after writing anything physically to disk. It affects all resload_Save#? functions and the FileLog/S feature. This makes sense because usual used filesystems will not write data immedately to disk. It takes some some time (1..3 sec) until all structures of the filesystem has been successful updated. The default value for WriteDelay is 150 which lets WHDLoad wait 3 seconds after each write to the harddisk. You can set this value to 0, but then you should never exit by a reset from the installed program because saved data may perhaps not been written correctly to disk.